Skip to content

Fix: Call cleanupTemporaryHtmlFile() in saveToS3()#164

Merged
stefanzweifel merged 1 commit into
stefanzweifel:mainfrom
PymPiDev:fix/cleanup-temp-html-in-save-to-s3
Jul 23, 2026
Merged

Fix: Call cleanupTemporaryHtmlFile() in saveToS3()#164
stefanzweifel merged 1 commit into
stefanzweifel:mainfrom
PymPiDev:fix/cleanup-temp-html-in-save-to-s3

Conversation

@PymPiDev

Copy link
Copy Markdown
Contributor

Summary

When using saveToS3() with raw HTML/views, temporary HTML files generated prior to browser execution were left uncleaned on disk.

This PR adds $this->cleanupTemporaryHtmlFile(); inside saveToS3(), matching the behavior of save() in Spatie Browsershot.

Changes

  • Added $this->cleanupTemporaryHtmlFile(); after browser execution in saveToS3().
  • Added test coverage in BrowsershotLambdaTest.php asserting that temporary files are deleted after saving to S3.

Checklist

  • Code style maintained.
  • Test coverage added for the new behavior.
  • All Pest tests passing locally.

@stefanzweifel

Copy link
Copy Markdown
Owner

Thanks!

@stefanzweifel
stefanzweifel merged commit 2adfaed into stefanzweifel:main Jul 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants